/*
 * Selected-Quoting for Messages based on the
 * selection-sharer Plugin by
 *  Xavier Damman (@xdamman) at 
    https://github.com/xdamman/share-selection
 *
 * Author: Xavier Damman (@xdamman)
 * MIT License
 */

@keyframes selectionSharerPopover-animation {
  0%{
  transform:matrix(0.97,0,0,1,0,12);
  filter:alpha(opacity=0);
  opacity:0
  }
  20%{
  transform:matrix(0.99,0,0,1,0,2);
  filter:alpha(opacity=70);
  opacity:.7
  }
  40%{
  transform:matrix(1,0,0,1,0,-1);
  filter:alpha(opacity=100);
  opacity:1
  }
  70%{
  transform:matrix(1,0,0,1,0,0);
  filter:alpha(opacity=100);
  opacity:1
  }
  100%{
  transform:matrix(1,0,0,1,0,0);
  filter:alpha(opacity=100);
  opacity:1
  }
}

#selectionSharerPopover {
  display: none;
  position: absolute;
  top: -100px;
  left: -100px;
  z-index: 1010;
}

#selectionSharerPopover:after {
  content: '';
  display: block;
  position: absolute;
  bottom: -3px;
  left: 50%;
  margin-left: -4px;
  width: 8px;
  height: 8px;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
  background: #262625;
  box-shadow: 0 0 2px #262625;
}

#selectionSharerPopover.anim {
  transition: top .075s ease-out;
  animation: selectionSharerPopover-animation 180ms forwards linear;
  -webkit-animation: selectionSharerPopover-animation 180ms forwards linear;
}

#selectionSharerPopover-inner {
  position:relative;
  overflow: hidden;
  -webkit-border-radius: 5px;
  border-radius: 5px;
  border: 1px solid;
  border-color: #262625 #1c1c1b #121211;
  box-shadow: 0 1px 3px -1px rgba(0,0,0,0.7),inset 0 0 1px rgba(255,255,255,0.07),inset 0 0 2px rgba(255,255,255,0.15);
  background-image: linear-gradient(to bottom,rgba(49,49,47,0.97),#262625);
  background-repeat: repeat-x;
}

#selectionSharerPopover .selectionSharerPopover-clip {
  position: absolute;
  bottom: -11px;
  display: block;
  left: 50%;
  clip: rect(12px 24px 24px 0);
  margin-left: -12px;
  width: 24px;
  height: 24px;
  line-height: 24px;
}

#selectionSharerPopover .selectionSharerPopover-arrow {
  display: block;
  width: 20px;
  height: 20px;
  -webkit-transform: rotate(45deg) scale(0.5);
  transform: rotate(45deg) scale(0.5);
  background-color: #454543;
  border: 2px solid #121211;
  box-sizing:content-box;
}


.selectionSharer ul {
  padding: 0;
  display: inline;
}

.selectionSharer ul li {
  float: left;
  list-style: none;
  background: none;
  margin: 0;
}

.selectionSharer a.action {
    display: block;
    color: white;
    margin: 5px 7px;
    width: 20px;
    height: 20px;
    border: none;
}

.selectionSharer a:hover {
  color: #ccc;
}

.selectionSharer a.quote {
  background: url('data:image/svg+xml;utf8,<svg width="2048" height="2048" viewBox="0 0 2048 2048" xmlns="http://www.w3.org/2000/svg"><path d="M1920 1024q0 174-120 321.5t-326 233-450 85.5q-70 0-145-8-198 175-460 242-49 14-114 22-17 2-30.5-9t-17.5-29v-1q-3-4-.5-12t2-10 4.5-9.5l6-9 7-8.5 8-9q7-8 31-34.5t34.5-38 31-39.5 32.5-51 27-59 26-76q-157-89-247.5-220t-90.5-281q0-130 71-248.5t191-204.5 286-136.5 348-50.5q244 0 450 85.5t326 233 120 321.5z" fill="#fff"/></svg>') no-repeat;
  -ms-background-size: 20px;
  background-size: 20px;
  background-position: 0 -1px;
}


#selectionSharerPopunder.fixed {
  transition: bottom 0.5s ease-in-out;
  width: 100%;
  position: fixed;
  left: 0;
  bottom:-50px;
}

.selectionSharer {
  transition: -webkit-transform 0.6s ease-in-out;
}

.selectionSharer.moveDown {
  -webkit-transform: translate3d(0,60px,0);
}

#selectionSharerPopunder {
  position: absolute;
  left: 0;
  width: 100%;
  height: 0px;
  transition: height 0.5s ease-in-out;
  background: #ccc;
  border: none;
  box-shadow: inset 0px 10px 5px -10px rgba(0,0,0,0.5), inset 0px -10px 5px -10px rgba(0,0,0,0.5);
  border-radius: 0;
  overflow: hidden;
}

#selectionSharerPopunder.show {
  height: 50px;
}

.selectionSharerPlaceholder {
  height: 1em;
  margin-bottom: -2em;
  transition: height 0.5s ease-in-out;
}

.selectionSharerPlaceholder.show {
  height: 50px !important;
}

#selectionSharerPopunder-inner ul {
  overflow: hidden;
  float:right;
  margin: 0px;
}

#selectionSharerPopunder-inner ul li {
  padding: 5px;
  overflow: hidden;
}

#selectionSharerPopunder-inner label {
  color: white;
  font-weight: 300;
  line-height: 50px;
  margin: 0px 20px 0px 10px;
}

#selectionSharerPopunder-inner a {
  width: 30px;
  height: 30px;
  background-size: 30px;
}
